package com.meisupic.copyright.domain.po;

import java.sql.Timestamp;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "abn_realname_auth")
public class AbnRealnameAuthPo {

  private Integer id;
  private Integer userId;
  private String type;
  private String personName;
  private String personCardId;
  private String organName;
  private String organCardNo;
  private String organPerson;
  private String personFrontImg;
  private String personBackImg;
  private String organImg;
  private Timestamp addTime;
  private String eSignAcountId;

  @Id
  @Column(name = "id", nullable = false)
  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  @Basic
  @Column(name = "user_id", nullable = false)
  public Integer getUserId() {
    return userId;
  }

  public void setUserId(Integer userId) {
    this.userId = userId;
  }

  @Basic
  @Column(name = "type", nullable = false, length = 32)
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  @Basic
  @Column(name = "person_name", nullable = true, length = 64)
  public String getPersonName() {
    return personName;
  }

  public void setPersonName(String personName) {
    this.personName = personName;
  }

  @Basic
  @Column(name = "person_card_id", nullable = true, length = 64)
  public String getPersonCardId() {
    return personCardId;
  }

  public void setPersonCardId(String personCardId) {
    this.personCardId = personCardId;
  }

  @Basic
  @Column(name = "organ_name", nullable = true, length = 128)
  public String getOrganName() {
    return organName;
  }

  public void setOrganName(String organName) {
    this.organName = organName;
  }

  @Basic
  @Column(name = "organ_card_no", nullable = true, length = 128)
  public String getOrganCardNo() {
    return organCardNo;
  }

  public void setOrganCardNo(String organCardNo) {
    this.organCardNo = organCardNo;
  }

  @Basic
  @Column(name = "organ_person", nullable = true, length = 64)
  public String getOrganPerson() {
    return organPerson;
  }

  public void setOrganPerson(String organPerson) {
    this.organPerson = organPerson;
  }

  @Basic
  @Column(name = "person_front_img", nullable = true, length = 512)
  public String getPersonFrontImg() {
    return personFrontImg;
  }

  public void setPersonFrontImg(String personFrontImg) {
    this.personFrontImg = personFrontImg;
  }

  @Basic
  @Column(name = "person_back_img", nullable = true, length = 512)
  public String getPersonBackImg() {
    return personBackImg;
  }

  public void setPersonBackImg(String personBackImg) {
    this.personBackImg = personBackImg;
  }

  @Basic
  @Column(name = "organ_img", nullable = true, length = 512)
  public String getOrganImg() {
    return organImg;
  }

  public void setOrganImg(String organImg) {
    this.organImg = organImg;
  }

  @Basic
  @Column(name = "add_time", nullable = false)
  public Timestamp getAddTime() {
    return addTime;
  }

  public void setAddTime(Timestamp addTime) {
    this.addTime = addTime;
  }

  @Basic
  @Column(name = "esign_acount_id", nullable = false, length = 128)
  public String geteSignAcountId() {
    return eSignAcountId;
  }

  public void seteSignAcountId(String eSignAcountId) {
    this.eSignAcountId = eSignAcountId;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AbnRealnameAuthPo that = (AbnRealnameAuthPo) o;
    return Objects.equals(id, that.id) &&
        Objects.equals(userId, that.userId) &&
        Objects.equals(type, that.type) &&
        Objects.equals(personName, that.personName) &&
        Objects.equals(personCardId, that.personCardId) &&
        Objects.equals(organName, that.organName) &&
        Objects.equals(organCardNo, that.organCardNo) &&
        Objects.equals(organPerson, that.organPerson) &&
        Objects.equals(personFrontImg, that.personFrontImg) &&
        Objects.equals(personBackImg, that.personBackImg) &&
        Objects.equals(organImg, that.organImg) &&
        Objects.equals(addTime, that.addTime) &&
        Objects.equals(eSignAcountId, that.eSignAcountId);
  }

  @Override
  public int hashCode() {

    return Objects
        .hash(id, userId, type, personName, personCardId, organName, organCardNo, organPerson,
            personFrontImg, personBackImg, organImg, addTime, eSignAcountId);
  }
}
